#region Page Header 
/**********
Class Name : IModel
Created By :hungud
Created On :  
Interfaces : None
BaseClass  : None
Purpose    :  
Version:     Version            When               Who            Why
             1.0                            Initial Draft.
****************/
#endregion Page Header 
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using Canvas.Base;

namespace Canvas.CanvasInterfaces
{
    /// <summary>
    /// Kieu Mau
    /// </summary>
    public interface IModel
    {
        float Zoom { get; set;}
        ICanvasLayer BackgroundLayer { get;}
        ICanvasLayer GridLayer { get;}
        ICanvasLayer[] Layers { get;}
        ICanvasLayer ActiveLayer { get; set;}
        ICanvasLayer GetLayer(String id);
        IDrawObject CreateObject(string type, UnitPoint point, ISnapPoint snappoint);
        void AddObject(ICanvasLayer layer, IDrawObject drawobject);
        void DeleteObjects(IEnumerable<IDrawObject> objects);
        void MoveObjects(UnitPoint offset, IEnumerable<IDrawObject> objects);
        void CopyObjects(UnitPoint offset, IEnumerable<IDrawObject> objects);
        void MoveNodes(UnitPoint position, IEnumerable<INodePoint> nodes);

        List<IDrawObject> GetHitObjects(ICanvas canvas, RectangleF selection, bool anyPoint);
        List<IDrawObject> GetHitObjects(ICanvas canvas, UnitPoint point);
        bool IsSelected(IDrawObject drawobject);
        void AddSelectedObject(IDrawObject drawobject);
        /// <summary>
        /// Lay doi tuong da lua chon
        /// </summary>
        IEnumerable<IDrawObject> SelectedObject { get;}
        /// <summary>
        /// Dem so doi tuong duoc lua chon
        /// </summary>
        int SelectedCount { get;}
        void ClearSelectedObjects();

        ISnapPoint SnapPoint(ICanvas canvas, UnitPoint point, Type[] runningsnaptypes, Type usersnaptype);
        bool CanUndo();
        bool DoUndo();
        bool CanRedo();
        bool DoRedo();
    }
}
